package com.tuling.code.jvm.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class ExecutorTest {
	private static ExecutorService exc = Executors.newFixedThreadPool(1);
	
	public static void main(String[] args) {
		exc.execute(new Runnable(){

			@Override
			public void run() {
				
			}}
		);
		
		Future f = exc.submit(new Runnable(){

			@Override
			public void run() {
				System.out.println("111");
			}
			
		});
		
		//submit 与  execute的区别
		//submit 执行返回一个 future  ,  execute返回空
		//submit是对execute的一个增强
		//submit实际也是调用了execute
	}
}
